(module AExp
  (lib "eopl.ss" "eopl")
  
  (require "drscheme-init.scm") 
  
  (define lex0
    '(
      (whitespace (whitespace)                       skip)
      ;;(comment    ("%" (arbno (not #\newline)))      skip)
      (number     (digit (arbno digit)) number)
      (Times-op   ("*")     string)
      (Div-op     ("/")     string)
      (Plus-op    ("+")     string)
      (Diff-op    ("-")     string)      
      
      )
    )

  
  (define Arith-grammar
    '((AExp
       (number)
       const-Aexp)
      (Times-oper
       (Times-op)
       Times-operator)
      (AExp
       (Plus-op "(" AExp "," AExp ")")
       Plus-Exp)
      (AExp
       (Diff-op "(" AExp "," AExp ")")
       Diff-Exp)
      (AExp
       (Times-oper "(" AExp "," AExp ")")
       Times-Exp)
      (AExp
       (Div-op "(" AExp "," AExp ")")
       Div-Exp)
      )
    )

  ;; build a scanner with empty grammar 
  (define scan0 (sllgen:make-string-scanner lex0 '()))
  
  ;; build data-types
  (sllgen:make-define-datatypes lex0 Arith-grammar)
  
  ;; build scanner with grammar 
  (define just-scan
    (sllgen:make-string-scanner lex0 Arith-grammar))
  
  ;; build parser 
  (define scan&parse 
    (sllgen:make-string-parser lex0 Arith-grammar))
  
  ;; show the datatypes 
  (define show-the-datatypes 
    (lambda () (sllgen:show-define-datatypes lex0 Arith-grammar)))
  
  (define exp1 "22")
  
  
  )